package com.cats.template.sys.services.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cats.template.sys.mapper.PermissionMapper;
import com.cats.template.sys.pojo.model.PermissionModel;
import com.cats.template.sys.services.PermissionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Set;

/**
 * @author duxiaobo
 * @date 2021/9/102:41 下午
 */
@Service
@Slf4j
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, PermissionModel> implements PermissionService {

    @Autowired
    private PermissionMapper permissionMapper;

    @Override
    public Set<PermissionModel> getPermissionsByRoleId(Long roleId) {
        return permissionMapper.getPermissionsByRoleId(roleId);
    }

    @Override
    public Set<PermissionModel> getAll() {
        return permissionMapper.getAll();
    }
}
